#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
#import <SobotKit/SobotKit.h>
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GeneratedPluginRegistrant registerWithRegistry:self];
  // Override point for customization after application launch.
  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    //   此方法已弃用 [ZCLibClient closeZCServer:NO];
    [[ZCLibClient getZCLibClient] removeIMAllObserver];
    [[ZCLibClient getZCLibClient] closeIMConnection];
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
    //   此方法已弃用 [[ZCLibClient getZCLibClient] aginitIMChat];
    if([ZCLibClient getZCLibClient].libInitInfo.app_key == nil){
        [ZCLibClient getZCLibClient].libInitInfo.app_key = @"your app_key";
    }
    if([ZCLibClient getZCLibClient].libInitInfo.app_key != nil){
        [[ZCLibClient getZCLibClient] checkIMObserverWithRegister];
        [[ZCLibClient getZCLibClient] checkIMConnected];
    }
}

@end
